/*
 * StaminaResource.h
 *
 *  Created on: 2014. 2. 11.
 *      Author: mega
 */

#ifndef STAMINARESOURCE_H_
#define STAMINARESOURCE_H_

namespace ProjectZ { namespace NResource {

class StaminaResource
{
public:
	class StaminaData
	{
	public:
		struct Data
		{
			int maxStamina;
			int recoveryMinute;
			int recoveryMinuteEvent;

			Data()
			{
				maxStamina			= -1;
				recoveryMinute		= -1;
				recoveryMinuteEvent	= -1;
			}
		};

	public:
		StaminaData();
		virtual ~StaminaData();

		bool	LoadResource(int company, int salecode);
		Data &	GetData() { return _data; }

	private:
		Data	_data;
	};

public:
	StaminaResource();
	virtual ~StaminaResource();

	bool	LoadResource();
	int		GetMaxStamina(User * pUser);
	int		GetRecoveryMinute(User * pUser);
	StaminaData::Data &	GetData(User * pUser);

private:
	StaminaData * pStaminaAD;
	StaminaData * pStaminaIOS;

	StaminaData::Data	clsNoneData;
};

} /*NResource*/ } /*ProjectZ*/


#endif /* STAMINARESOURCE_H_ */
